<!DOCTYPE html>
<html>
<head>
<include file="Include:meta" />
<title>绩效考评-目的地运营集团数据管理平台</title>
<include file="Include:style" />
<style>
	td{ width: 5.555%; }
	.c_m{ text-align: center; font-weight: bold; vertical-align: middle !important; }
	input{ text-align: center; }
	.c_v{ text-align: center; vertical-align: middle !important; }
	.w60{ width: 60px; }
	.form-btn-item{ position: relative; }
</style>
</head>
<body>
<include file="Include:header" />
<include file="Include:left" />
<div id="main">
	<div class="crumbs">
		<div class="crumbs-text">{$tid['tname']}</div>
	</div>
	<div id="content">
		<div class="form-main"><div class="form-title">{$tid['tname']}</div></div>
		<form method="post" name="number_validate" id="password_validate" novalidate="novalidate">
		<if condition="$app1 eq NULL">
		<input type="hidden" name="action" value="add">
		<else/>
		<input type="hidden" name="action" value="edit">
		</if>
		<input type="hidden" name="id" value="{$id}">
		<div class="table-scrollx">
			<table class="table table-bordered table-hover">
				<tr>
					<td class="c_m" style="width:15%" colspan="3">姓 名</td>
					<td style="width:15%" colspan="3">{$sup1['username']}</td>
					<td class="c_m" style="width:15%" colspan="3">职 位</td>
					<td style="width:15%" colspan="3">{$sup1['position_name']}</td>
					<td class="c_m" style="width:15%" colspan="3">考 核 者</td>
					<td colspan="3">{$login_username}</td>
				</tr>
				<tr>
					<td class="c_m" style="width:15%" colspan="3">部 门</td>
					<td style="width:15%" colspan="3">{$sup1['department_name']}</td>
					<td class="c_m" style="width:15%" colspan="3">考核周期</td>
					<td colspan="9">2017年度</td>
				</tr>
				<tr>
					<td class="c_m" colspan="3">评价尺度及分数</td>
					<if condition="$app1['status'] eq 1">
					<td class="c_m" colspan="9">优秀（10分）  良好（8分）  一般（6分）  较差（4分）  极差（2分）</td>
					<td class="c_m" colspan="3">评分</td>
					<td class="c_m" colspan="2">本栏平均</td>
					<else/>
					<td class="c_m" colspan="12">优秀（10分）  良好（8分）  一般（6分）  较差（4分）  极差（2分）</td>
					<td class="c_m" colspan="3">评分</td>
					</if>
				</tr>
				<tr>
					<td class="c_m" rowspan="4"><p style="width:20px;margin:0 auto">工作业绩</p></td>
					<td colspan="2">1.{$tid['b1']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b1_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum1']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum1'] neq NULL"><if condition="$app1['sum1'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
					<if condition="$app1['status'] eq 1"><td colspan="2" rowspan="4"><strong>{$app1['sum_pj1']}</strong></td></if>
				</tr>
				<tr>
					<td colspan="2">2.{$tid['b2']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b2_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum2']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum2'] neq NULL"><if condition="$app1['sum2'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
				</tr>
				<tr>
					<td colspan="2">3.{$tid['b3']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b3_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum3']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum3'] neq NULL"><if condition="$app1['sum3'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
				</tr>
				<tr>
					<td colspan="2">4.{$tid['b4']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b4_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum4']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum4'] neq NULL"><if condition="$app1['sum4'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
				</tr>
				<tr>
					<td class="c_m" rowspan="8"><p style="width:20px;margin:0 auto">工作能力</p></td>
					<td colspan="2">5.{$tid['b5']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b5_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum5']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum5'] neq NULL"><if condition="$app1['sum5'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
					<if condition="$app1['status'] eq 1"><td colspan="2" rowspan="8"><strong>{$app1['sum_pj2']}</strong></td></if>
				</tr>
				<tr>
					<td colspan="2">6.{$tid['b6']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b6_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum6']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum6'] neq NULL"><if condition="$app1['sum6'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
				</tr>
				<tr>
					<td colspan="2">7.{$tid['b7']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b7_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum7']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum7'] neq NULL"><if condition="$app1['sum7'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
				</tr>
				<tr>
					<td colspan="2">8.{$tid['b8']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b8_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum8']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum8'] neq NULL"><if condition="$app1['sum8'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
				</tr>
				<tr>
					<td colspan="2">9.{$tid['b9']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b9_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum9']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum9'] neq NULL"><if condition="$app1['sum9'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
				</tr>
				<tr>
					<td colspan="2">10.{$tid['b10']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b10_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum10']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum10'] neq NULL"><if condition="$app1['sum10'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
				</tr>
				<tr>
					<td colspan="2">11.{$tid['b11']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b11_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum11']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum11'] neq NULL"><if condition="$app1['sum11'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
				</tr>
				<tr>
					<td colspan="2">12.{$tid['b12']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b12_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum12']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum12'] neq NULL"><if condition="$app1['sum12'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
				</tr>
				<tr>
					<td class="c_m" <if condition="$tid['b17'] neq NULL">rowspan="5"<else/>rowspan="4"</if>><p style="width:20px;margin:0 auto">工作态度</p></td>
					<td colspan="2">13.{$tid['b13']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b13_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum13']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum13'] neq NULL"><if condition="$app1['sum13'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
					<if condition="$app1['status'] eq 1"><td colspan="2" <if condition="$tid['b17'] neq NULL">rowspan="5"<else/>rowspan="4"</if>><strong>{$app1['sum_pj3']}</strong></td></if>
				</tr>
				<tr>
					<td colspan="2">14.{$tid['b14']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b14_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum14']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum14'] neq NULL"><if condition="$app1['sum14'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
				</tr>
				<tr>
					<td colspan="2">15.{$tid['b15']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b15_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum15']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum15'] neq NULL"><if condition="$app1['sum15'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
				</tr>
				<tr>
					<td colspan="2">16.{$tid['b16']}</td>
					<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b16_remark']}</td>
					<td class="c_v" colspan="3">
						<if condition="$app1['status'] eq 1">
							{$app1['sum16']}
						<else/>
							<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
								<for start="10" end="0" comparison="egt" step="-1">
									<option value="{$i}" <if condition="$app1['sum16'] neq NULL"><if condition="$app1['sum16'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
								</for>
							</select>
						</if>
					</td>
				</tr>
				<if condition="$tid['b17'] neq NULL">
					<tr>
						<td colspan="2">17.{$tid['b17']}</td>
						<td <if condition="$app1['status'] eq 1">colspan="9"<else/>colspan="12"</if>>{$tid['b17_remark']}</td>
						<td class="c_v" colspan="3">
							<if condition="$app1['status'] eq 1">
								{$app1['sum17']}
							<else/>
								<select name="sum[]" class="form-control w100 select-add" autocomplete="off">
									<for start="10" end="0" comparison="egt" step="-1">
										<option value="{$i}" <if condition="$app1['sum17'] neq NULL"><if condition="$app1['sum17'] eq $i">selected</if><else/><if condition="$i eq 10">selected</if></if>>{$i}</option>
									</for>
								</select>
							</if>
						</td>
					</tr>
				</if>
				<tr>
					<td class="c_m" colspan="3">评价得分</td>
					<td colspan="15"><strong>Ⅰ</strong> （1∽4项平均分）×4 +（5∽12平均分）×3 +（13∽<if condition="$tid['b17'] neq NULL">17<else/>16</if>项平均分）×3 <if condition="$app1['status'] eq 1">=<strong>{$app1['sumI']+0}</strong>分</if></td>
				</tr>
				<tr>
					<td class="c_m" colspan="3" rowspan="2">奖惩记录</td>
					<td colspan="15"><strong>Ⅱ</strong> 处罚：警告<if condition="$app1['status'] eq 1"><strong>{$app1['jg']}</strong><else/><input type="text" name="jg" class="form-control w100 ml10 mr10 secend-text" maxlength="2" autocomplete="off" value="{$app1['jg']}"></if>次×1 + 小过<if condition="$app1['status'] eq 1"><strong>{$app1['xg1']}</strong><else/><input type="text" name="xg1" class="form-control w100 ml10 mr10 secend-text" maxlength="2" autocomplete="off" value="{$app1['xg1']}"></if>次×3 + 大过<if condition="$app1['status'] eq 1"><strong>{$app1['dg1']}</strong><else/><input type="text" name="dg1" class="form-control w100 ml10 mr10 secend-text" maxlength="2" autocomplete="off" value="{$app1['dg1']}"></if>次×9 <if condition="$app1['status'] eq 1"> =<strong>{$app1['sumII']+0}</strong>分</if><span class="error-item">必须是大于0的正整数</span></td>
				</tr>
				<tr>
					<td colspan="15"><strong>Ⅲ</strong> 奖励：表扬<if condition="$app1['status'] eq 1"><strong>{$app1['by']}</strong><else/><input type="text" name="by" class="form-control w100 ml10 mr10 secend-text" maxlength="2" autocomplete="off" value="{$app1['by']}"></if>次×1 + 小功<if condition="$app1['status'] eq 1"><strong>{$app1['xg2']}</strong><else/><input type="text" name="xg2" class="form-control w100 ml10 mr10 secend-text" maxlength="2" autocomplete="off" value="{$app1['xg2']}"></if>次×3 + 大功<if condition="$app1['status'] eq 1"><strong>{$app1['dg2']}</strong><else/><input type="text" name="dg2" class="form-control w100 ml10 mr10 secend-text" maxlength="2" autocomplete="off" value="{$app1['dg2']}"></if>次×9 <if condition="$app1['status'] eq 1">=<strong>{$app1['sumIII']+0}</strong>分</if><span class="error-item">必须是大于0的正整数</span></td>
				</tr>
				<if condition="$app1['status'] eq 1">
				<tr>
					<td class="c_m" colspan="3">总 分</td>
					<td colspan="15"><strong>Ⅰ</strong>  分 - <strong>Ⅱ</strong>  分 + <strong>Ⅲ</strong>  分 =  <strong>{$app1['sum_all']+0}</strong>分</td>
				</tr>
				</if>
				<tr>
					<td class="c_m" colspan="3">考核者意见</td>
					<td colspan="15">
						<if condition="$app1['status'] eq 1">
							{$app1['comment']}
						<else/>
							<textarea name="comment" class="form-control w500 h150" autocomplete="off">{$app1['comment']}</textarea><span class="error-item">必填项</span>
						</if>
					</td>
				</tr>
			</table>
		</div>
		<div class="form-btn-item">
			<if condition="($app1 eq NULL) or ($app1['status'] eq -1)">
				<button class="btn btn-submit" type="button">提交</button>
			<else/>
				<button class="btn lost_submit" type="button" mid="{$id}">放弃提交</button>
			</if>
			<button class="btn btn-default goback1" type="button">返回</button>
		</div>
		</form>
	</div>
</div>
<include file="Include:javascript" />
<script type="text/javascript">
$(function(){
	$(".goback1").click(function(){
		var $url = "{$_SESSION['jixiao_appraisal']}";
		window.location.href = $url;
	});
	$('.lost_submit').click(function(){
		var mid = $(this).attr("mid");
		$.ajax({
			cache:true,
			type:"POST",
			dataType:"json",
			data:{"id":mid,"action":"down"},
			url:"__APP__/Index/jixiao_evaluation_one_ajax",
			success:function(data){
				success_pop(data.status,data.msg);
			}
		});
	})
	$('.btn-submit').click(function(){
		var tag = true;
		$('.required-select').each(function(){
			var val = $(this).val();
			if(val==-10){
				$(this).nextAll('.error-item').show();
				tag = false;
			}
		})
		$('.secend-text').each(function(){
			var val = $(this).val();
			if(val!="" && ! /^\+?[1-9]\d*$/.test(val)){
				$(this).addClass('red_border');
				$(this).nextAll('.error-item').show();
				tag = false;
			}
		})
		if($("[name='comment']").val()==''){
			$("[name='comment']").addClass('red_border');
			$("[name='comment']").next('.error-item').show();
			tag = false;
		}
		if(tag){
			$.ajax({
				type:"POST",
				async:false,
				dataType:"json",
				data:$("[name='number_validate']").serialize(),
				url:"__APP__/Index/jixiao_evaluation_one_ajax",
				success:function(data){
					success_pop(data.status,data.msg,1,"__APP__/Index/jixiao_appraisal");
				}
			});
		}
	})
	$('.secend-text').focus(function(){
		$(this).removeClass('red_border');
		$('.form-btn-item .error-item').hide();
		$(this).nextAll('.error-item').hide();
	})
	$('.required-select').change(function(){
		$(this).nextAll('.error-item').hide();
	})
	$("[name='comment']").focus(function(){
		$("[name='comment']").removeClass('red_border').next('.error-item').hide();
	})
});
</script>
</body>
</html>